<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /><!-- 控制浏览器文件模式为IE8 -->
<title>角色權限列表页面</title>

<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="js/artDialog/skins/default.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/elegant/om-all.css" />

<script src="js/artDialog/artDialog.js?skin=blue"></script>
<script src="js/artDialog/plugins/iframeTools.js"></script>
<script src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/operamasks-ui.min.js"></script>
<script language="javascript">
	var j = jQuery.noConflict();
	j.ajaxSetup({
		cache:false,
		async: false
	});
</script>
<script>
	function search() {
		j("#searchKey").val("search");
		j("#currentPage").val("1");
		var flag=true;
		if(flag)
		{
			j.omMessageBox.waiting({
		         title:'請稍後',
		         content:'服務器正在處理您的請求，請稍後...',
		     });
			document.forms[0].submit();
		}		
	}
	
</script>
</head>
<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
	    <li>首页</li>
		<li>系统管理</li>
	    <li><a href="#" onclick="javascript:window.location.href='./adminRole.do?action=list'"> 角色權限管理</a></li>
		<li>角色權限列表</li>
	    </ul>
	</div>
	<div class="rightinfo">
			<form id="form1" action="./adminRole.do?action=list" method="post">
			<ul class="seachform">
				<li>
					<label>角色名稱：</label>
					<input name="roleName" id="roleName" value="${roleName}" type="text" class="scinput" autocomplete="off"/>
				</li>
				<li>
					<label>角色代碼：</label>
					<input name="roleCode" id="roleCode" value="${roleCode}" type="text" class="scinput" autocomplete="off"/>
				</li>
				<li><label>&nbsp;</label><input type="button" onclick="search()" class="scbtn" value="查詢" /></li>
			</ul>
			
			<table class="tablelist">
				<thead>
					<tr>
						<th>序号</th>
						<th>角色名稱</th>
			            <th>角色代碼</th>
			            <th>描述</th>
			            <th>创建时间</th>
			            <th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:set var="i" value="0" />
				<c:forEach var="list" items="${roleList}">
					<c:set var="i" value="${i+1}" />
						<tr>
							<td>${i}</td>
							<td>${list.roleName}</td>
							<td>${list.roleCode}</td>
							<td>${list.description}</td>
							<td><fmt:formatDate value="${list.createdTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				            <td>
				            	<a href="javascript:window.location.href='./adminRole.do?action=special&roleId=${list.roleId}';"> 權限分配</a> 
				            </td>
							<td>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</form>
	</div>
	<script type="text/javascript">
		$('.tablelist tbody tr:odd').addClass('odd');
	</script>
</body>
</html>